package com.dhcc.sds.base.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dhcc.sds.base.entity.SdsExpressEntity;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
import java.util.Map;

/**
 * @version 1.0 DHCC-SDS
 * @Description: 单病种公共服务接口类
 * @Project Name:
 * @Package Name:
 * @File Name:
 * @author:sunyingjie-医务管理
 * @date:2021年04月21日16:54:54
 * @Copyright: (c) DHCC All rights reserved.
 */
public interface ISdsCommonService {
    public static final String CACHE_NAME = "sds-cache";

    JSONObject getDicMap(String typeCode);
    JSONArray getDicArray(String typeCode);
    JSONObject getVerMap();
    JSONObject findDeptList();
    JSONObject findDeptList(String hospId);
    JSONObject findHospList();
    JSONArray getDepartMap(Map<String, Object> map);
    JSONArray getMedicalGroupMap(Map<String, Object> map);
    JSONArray findExps(String code);
    SdsExpressEntity getExpEntity(String dicCode, String expCode);
    Long getDictId(String typeCode, String dictCode);
    String getDictDesc(String typeCode, String dictCode);
    String getDictCode(Long dictId);
    String getHospIdBySysUser();
    List<String> getDeptIdsBySysUser();
    //病种项目下拉框
    JSONArray findFormItems(Long entityId);
    //病种项目下拉树
    JSONArray findFormItemTree(Long entityId);

    @Cacheable(value = CACHE_NAME, key = "#root.methodName")
    JSONObject getAsmtMap();
    List entityTestGroup();

    /**
     * 获取字典数组
     * @param typeCode
     * @return
     * [{code:xx,text:xx},{code:xx,text:xx}]
     */
    JSONArray getDicCodeArray(String typeCode);

    JSONArray getEntityMap();

    JSONArray getEntityMap(String entityType);

    JSONArray getDepartGroupMap(Map<String, Object> map);
}
